{% extends "base.html" %}
{% load staticfiles %}
{% block title %}竞选{% endblock %}
{% block content %}
<div class="row text-center vertical-middle-sm">
    {% if error_message %}
    <p>{{ error_message }}</p>
    {% endif %}
    <form method="post">
        {% csrf_token %}
        {% for item in items %}
        <label><input type="radio" name="item" value="{{ item.id }}">
        {{ item.name }}竞选{{ item.position }}
        {% if number_of_times %}
        目前有{{ item.number }}票
        {% endif %}</label><br>
        {% endfor %}
        <input type="submit" value="提交">
    </form>
</div>

<script>
    if ( window.history.replaceState ) {
        window.history.replaceState( null, null, window.location.href );
    }
</script>

{% endblock %}